package top.carrotguo.weibo.contract;

import com.sina.weibo.sdk.auth.Oauth2AccessToken;

import top.carrotguo.weibo.bean.CommentListBean;
import top.carrotguo.weibo.retrofit.callback.BaseCallback;
import top.carrotguo.weibo.retrofit.callback.ErrorInfo;
import top.carrotguo.weibo.view.IView;

public interface CommentContract {
    interface Model {
        //获取某个id的微博的评论列表
        void getComments(Oauth2AccessToken token, String id,
                         int count, int page,
                         final BaseCallback<CommentListBean,ErrorInfo> callback);
    }

    interface View extends IView {
        /*访问到评论列表，并且不是空*/
        void showCommentsSuccessed(CommentListBean successInfo);
        /*访问不到评论列表*/
        void showCommentsFailed(ErrorInfo errorInfo);
        /*访问到的列表为空*/
        void showCommentsEmpty();
        /*显示正在加载列表*/
        void showLoadingComment();
        /*隐藏正在加载列表*/
        void hideLoadingComment();
        /*加载更多评论成功*/
        void loadMoreSuccess(CommentListBean successInfo);
        /*加载更多评论失败*/
        void loadMoreFail(ErrorInfo errorInfo);
    }

    interface Presenter {
        //获取评论列表(第一页)
        void getComments(Oauth2AccessToken token,String id,int count,int page);
    }
}
